$('#tab_'+type).tabs({
	height: frmHeight-163,
	width: frmWidth-267,
	plain: false,
});
switch (type){
    case "user_management":
        $('#tab_'+type).tabs('select','Users List');
        break;
}
$('#tab_'+type).tabs({
	onSelect: function(title){
		switch(title){
			/***User management tabs**/
			case 'Users List': 
				_post = [{name:'type', value: 'user_list'}];		
				$('#setup_user_list').html('');
				$("#setup_user_list").addClass("loading");
				$.post(host+'setup/gettab/', _post, function(resp) {
					$('#setup_user_list').removeClass('loading')
					$('#setup_user_list').html(resp);							
				});	
			break;
			case 'User Level':
				_post = [{name:'type', value: 'user_level'}];		
				$('#setup_user_level').html('');
				$("#setup_user_level").addClass("loading");
				$.post(host+'setup/gettab/', _post, function(resp) {
					$('#setup_user_level').removeClass('loading')
					$('#setup_user_level').html(resp);							
				});	
			break;
			case 'User Group':
				_post = [{name:'type', value: 'user_group'}];		
				$('#setup_user_group').html('');
				$("#setup_user_group").addClass("loading");
				$.post(host+'setup/gettab/', _post, function(resp) {
					$('#setup_user_group').removeClass('loading')
					$('#setup_user_group').html(resp);							
				});	
			break;
			case 'User Role':
				_post = [{name:'type', value: 'user_role'}];		
				$('#setup_user_role').html('');
				$("#setup_user_role").addClass("loading");
				$.post(host+'setup/gettab/', _post, function(resp) {
					$('#setup_user_role').removeClass('loading')
					$('#setup_user_role').html(resp);							
				});	
			break;
			case 'Application Modules':
				_post = [{name:'type', value: 'app_modules'}];		
				$('#setup_app_modules').html('');
				$("#setup_app_modules").addClass("loading");
				$.post(host+'setup/gettab/', _post, function(resp) {
					$('#setup_app_modules').removeClass('loading')
					$('#setup_app_modules').html(resp);							
				});	
			break;
			case 'Application Functions':
				_post = [{name:'type', value: 'app_functions'}];		
				$('#setup_app_functions').html('');
				$("#setup_app_functions").addClass("loading");
				$.post(host+'setup/gettab/', _post, function(resp) {
					$('#setup_app_functions').removeClass('loading')
					$('#setup_app_functions').html(resp);							
				});	
			break;
                        /**End User Management Tabs**/
                        
			
		}
	}
});
